;;; Parsing symbol table... Warning: "_gp" moved from #x00C082C0
to #x00C08460.
Warning: "end" moved from #x00C00340 to #x00C004E0.
;;; o.k. now load the compiled Lisp object file.
* (load "test")
;;; Now we can call the routine that sets up the parameters and calls the C
;;; function.
* (test-c-call::call-cfun)
;;; The C routine prints the following information to standard output.
i = 5
s = Another Lisp string
r->x = 20
r->s = A Lisp string
a[0] = 0.
a[1] = 1.
a[2] = 2.
a[3] = 3.
a[4] = 4.
a[5] = 5.
a[6] = 6.
a[7] = 7.
a[8] = 8.
a[9] = 9.
;;; Lisp prints out the following information.
Returned from C function.
;;; Return values from the call to test-c-call::call-cfun.
10
"A C string"
*
If any of the foreign functions do output, they should not be called
from within Hemlock. Depending on the situation, various strange
behavior occurs. Under X, the output goes to the window in which Lisp
was started; on a terminal, the output will overwrite the Hemlock screen
image; in a Hemlock slave, standard output is `/dev/null' by default, so
any output is discarded.
File: cmu-user.info Node: Interprocess Communication under LISP, Prev: Alien Objects, Up: Top, Next: Debugger Programmer's Interface
Interprocess Communication under LISP
*************************************
Written by William Lott and Bill Chiles
CMU Common Lisp offers a facility for interprocess communication (IPC)
on top of using Unix system calls and the complications of that level of
IPC. There is a simple remote-procedure-call (RPC) package build on top
of TCP/IP sockets.
* Menu:
* The REMOTE Package::
* The WIRE Package::
* Out-Of-Band Data::
File: cmu-user.info Node: The REMOTE Package, Prev: Interprocess Communication under LISP, Up: Interprocess Communication under LISP, Next: The WIRE Package
The REMOTE Package
==================
The `remote' package provides simple RPC facility including interfaces
for creating servers, connecting to already existing servers, and
calling functions in other Lisp processes. The routines for
establishing a connection between two processes, `create-request-server'
and `connect-to-remote-server', return WIRE structures. A wire
maintains the current state of a connection, and all the RPC forms
require a wire to indicate where to send requests.